package cn.chengpengper.rpc.codec;

import cn.chengpengper.rpc.serialization.api.Serialization;
import cn.chengpengper.rpc.serialization.jdk.JdkSerialization;
import cn.chengpengper.rpc.spi.loader.ExtensionLoader;

/**
 * @author chengpeng.hu
 */
public interface RpcCodec {

    /**
     * 获取序列化器
     *
     * @return JDK序列号器
     */
    default Serialization getJdkSerialization(String serializationType) {
        return ExtensionLoader.getExtension(Serialization.class, serializationType);
    }

}
